﻿using System.Globalization;

namespace Compass.Maui.Converters;

public class StatusToColorConverter : IValueConverter
{
    public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        return value.ToString() switch
        {
            "计划" => new SolidColorBrush(Colors.LightSteelBlue),
            "制图" => new SolidColorBrush(Colors.LightSkyBlue),
            "生产" => new SolidColorBrush(Colors.Moccasin),
            "入库" => new SolidColorBrush(Colors.MistyRose),
            "发货" => new SolidColorBrush(Colors.PaleGreen),
            "结束" => new SolidColorBrush(Colors.Silver),
            _ => new SolidColorBrush(Colors.LightSalmon)
        };
    }

    public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}